Method and apparatus for optimizing usage of ternary content addressable memory (tcan)

ABSTRACT

Various embodiments provide a method and apparatus for processing incoming packets in an efficient manner. A service ID bitmap indicating available services associated with the user is established. The available services are grouped into service set. Common service set having common set of rules is determined. A user associated with common service set and incoming traffic is identified. The incoming traffic is processed according to the common set of rules indicated by the service ID bitmap. The efficient use of Ternary Content Addressable Memory (TCAM) results in faster search result, lower power consumption and chip footprint among others.

TECHNICAL FIELD

The invention relates generally to network communications and moreparticularly to methods and apparatus for optimizing usage of ternarycontent addressable memory.

BACKGROUND

A user/consumer may subscribe to different services like Data, VoIP,Video, P2P, etc. Each of these services may be charged differently, mayreceive different quality of service (QoS) treatment in the network andso on. A consumer/user's subscription or service level agreement (SLA)determines the treatment accorded to the consumer/user's traffic. Forexample, if a mobile user signs up for Data and Video service, thenwithin a routing device the mobile user's traffic may forwarded to aternary content addressable memory (TCAM) for traffic classificationand/or to optimize or guarantee performance, improve latency, and/orincrease usable bandwidth for some kinds of packets by delaying otherkinds of packets that meet certain criteria for charging and QoSpurposes.

Every time a subscriber signs up for a service, a set of related servicerules is instantiated into a TCAM so that the service traffic can besegregated for charging and QoS purposes.

SUMMARY

Various embodiments provide a method and apparatus for improving ternarycontent addressable memory (TCAM) search applications associated withmultiple entities. The efficient use of TCAM results in faster searchresult, lower power consumption and chip footprint among others.

In one embodiment, a method is provided for establishing for each of aplurality of users a respective service ID bitmap. The service ID bitmapis adapted to indicate one or more available services associated with auser wherein each service is associated with a corresponding set ofrules instantiated into memory, each rule being associated with arespective service ID; grouping a plurality of services into commonservice set having associated with it a common set of rules; determiningeach user associated with the common service; and processing eachreceived packet from the user associated with the common service setaccording to those common service set rules indicated by the userservice ID bitmap.

Another embodiment provides an apparatus for processing incomingpackets. The apparatus comprises a memory and a processor configured toestablish for each of a plurality of users a respective service IDbitmap. The service ID bitmap is adapted to indicate one or moreavailable services associated with a user wherein each service isassociated with a corresponding set of rules instantiated into memory,each rule being associated with a respective service ID; group aplurality of services into common service set having associated with ita common set of rules; determine each user associated with the commonservice; and process each received packet from the user associated withthe common service set according to those common service set rulesindicated by the user service ID bitmap.

BRIEF DESCRIPTION OF THE DRAWINGS

The teachings of the present invention can be readily understood byconsidering the following detailed description in conjunction with theaccompanying drawings, in which:

FIG. 1 depicts a high-level block diagram of an apparatus benefitingfrom embodiments of the present invention;

FIG. 2 depicts a high-level block diagram of a network element portionaccording to one embodiment;

FIG. 3A depicts a graphical representation of the TCAM Key CompositionTable 310 utilized by the mapping service program 223 of FIG. 2;

FIG. 3B depicts a TCAM classification field and Services Map Tableillustrating an embodiment of a classification criteria used in TCAM keyComposition Table of FIG. 3;

FIG. 4A depicts a graphical representation of a User's Services Mapaccording to an embodiment;

FIG. 4B depicts a graphical representation of a User's Data Baseaccording to an embodiment;

FIG. 4C depicts a graphical representation of a Lookup Key on User 1Traffic for Service 1 according to an embodiment;

FIG. 4D depicts a graphical representation of a Lookup Key on User 1Traffic for Service 4 according to an embodiment;

FIG. 5 depicts a flow diagram of a method according to an embodiment;and

FIG. 6 depicts a high-level block diagram of a general-purpose computersuitable for use in performing the functions described herein.

To facilitate understanding, identical reference numerals have been usedto designate elements having substantially the same or similar structureand/or substantially the same or similar function.

DETAILED DESCRIPTION OF THE INVENTION

Various embodiments provide a method and apparatus to provide TCAM usageefficiency by providing a common TCAM instantiation of service rulesassociated with multiple services and/or subscribers.

TCAM is an expensive resource in terms of cost, physical footprint,thermal requirements and so on. Various embodiments discussed herein arebased in part upon the inventor's recognition that TCAM usage may beintelligently managed with different sets or types of users. Forexample, different types of users may sign up for different subset ofavailable services; specifically, a first set of users may sign up for asubset of services including data and VoIP only, while a second set ofusers may sign up for a subset of services including data and videoonly. The TCAM processing associated with any member of a particular setof users may be the same or similar to other members of the particularset of users.

FIG. 1 depicts a high-level block diagram of an apparatus benefitingfrom embodiments of the present invention. Specifically, FIG. 1 depictsa router 106 in communication with a network 105 and a network manager107.

The router 106 includes a plurality of input output (I/O) cards 110-1,110-2 and so on up to 110-N (collectively I/O cards 110), a switchfabric 120 and a control plane module 130. The control plane module 130controls the operation of the I/O cards 110 and switch fabric 120 byrespective control signals CONT.

Each of the I/O cards 110 includes a plurality of ingress ports 112including corresponding ingress port buffers 112B, a plurality of egressports 114 including corresponding egress port buffers 114B, a TCAMmodule 115, and a controller 116.

The controller 116 includes an I/O module 117, a processor 118 andmemory 119. The memory 119 is depicted as including software modules,instantiated objects and the like to provide a TCAM manager 119TM,routing data 119RD and other functions 119O. The controller 116 may beimplemented as a general purpose computing device or specific purposecomputing device, such as described below with respect to FIG. 6.

The I/O cards 110 operate to convey packets between the network 105 andthe switch fabric 120. Packets received at a particular ingress port 112of an I/O card 110 may be conveyed to the switch fabric 120 or back tothe network 105 via a particular egress port 112 of the I/O cards 110.Routing of packets via the I/O cards 110 is accomplished according torouting data provided by the control plane module 130, which may bestored in the routing data portion of memory 119.

The switch fabric 120 may comprise any standard switch fabric such aselectrical, optical, electro-optical, MEMS and the like.

The control plane module 130 receives from a network manager 107configuration data, routing data, policy information, policerinformation and other information pertaining to various managementfunctions. The control plane module 130 provides management andoperations data to the network manager 107, including data such asconfiguration data, status data, alarm data, performance data and thelike.

The control plane module 130 comprises an I/O module 131, a processor132 and memory 133. The memory 133 is depicted as including softwaremodules, instantiated objects and the like to provide a buffer manager133BM, a TCAM manager 133TM, routing data 133RD and other functions1330. The control plane module 130 may be implemented as a generalpurpose computing device or specific purpose computing device, such asdescribed below with respect to FIG. 6.

It is noted that various functions described herein are depicted asbeing included within both of the controller 116 of the I/O card 110 andthe control plane module 130. However, in various embodiments thefunctions so depicted are included within only one of the controller 116of the I/O card 110 and the control plane module 130. That is, the TCAMmanager function may, in various embodiments, be implemented as part ofthe controller 116 (i.e., as TCAM manager 119TM) or be implemented aspart of the control plane module 130 (i.e., as TCAM manager 133TM).Similarly, the router data may, in various embodiments, the implementedas part of the controller 116 (i.e., as router data 119RD) or beimplemented as part of the control plane module 130 (i.e., as routerdata 133RD).

The buffer manager 133BM operates to manage the configuration of thevarious buffers such that they conform to the buffer structure providedby, illustratively, ingress ports, egress ports, switch fabric and soon. The buffer manager 133 BM also interacts with the various buffersoperative within the context of the router 106 to determine whether softor hard limits have been reached, such as an overutilization warninglimit (e.g., 80% of buffer utilization level), an overutilization alarmlimit (e.g., 95% of buffer utilization level) and so on.

The router 106 is operable to process traffic to and from various clientdevices, networks and so on (not shown) operably communicating withnetwork 105. In processing traffic received from client devices and thelike, the router 106 performs various functions such as described belowto ensure that the appropriate service parameters are associated withthe process traffic.

The routing data 119RD or 133RD operates to process routing informationsuch that packets or traffic flows received at ingress ports are routedto appropriate egress ports within the context of router 106. Therouting data 133RD may include routing tables, protection or faultrecovery information and so on.

The TCAM manager 119TM or 133TM operates to process service or policyinformation such as service level agreement (SLA), trafficclassification constraints, subscriber/user constraints, differentiatedservice levels, differentiated QoS levels/parameters and, generally, anyother parameter impacting the number, type, operating parameters and/orother characteristics associated with classification or processing rulesused within the context of a received packet processing. Generallyspeaking, the TCAM manager 119TM or 133TM operates to enable efficientprocessing of user/client traffic with respect to the TCAM 115.Exemplary function sets associated with TCAM manager 133TM will bedescribed in more detail below with respect to FIG. 2.

Generally speaking, TCAM manager 119TM or 133TM manages the use of TCAM115 associating individual clients with one or more clients, where eachclient is associated with a subset of available services. In thismanner, rather than instantiating within the TCAM a group of rulesassociated with each client, a group of rules is associated with eachset of similarly situated clients. Various embodiments discussed hereinaddress mechanisms for identifying client membership, instantiatingappropriate set rules and so on.

Thus, various embodiments improve TCAM usage efficiency by providing acommon TCAM instantiation of service rules associated with multipleservices and/or subscribers. For example, one embodiment provides forthe building of a set of services which are common among n users, wherethe number of elements in each such super set can be limited to 8, 16 or32 (depending on the width of TCAM available). For illustrativepurposes, the services set are limited to eight (8). Each user may beusing a sub-set of services or all eight (8).

FIG. 2 depicts a high-level block diagram of TCAM manager apparatussuitable for use in various embodiments. Specifically, TCAM managerapparatus 260 includes a processor 210, a memory 220, and an I/Ointerface 230 implementing a TCAM manager function suitable forimplementing one or more of the relevant functions described above withrespect to FIG. 1.

Processor 210 controls the operation of TCAM manager apparatus 260.Processor 210 cooperates with memory 220 and I/O interface 230.

Memory 220 may store various programs adapted for execution by processor210, as well as a TCAM Key Composition Table such as described in moredetail below with respect to the TCAM Key Composition Table 310 of FIG.3.

The processor-executable programs may include an I/O interface program221, a mapping service program 223, a request service program 225, asnapshot service program 227 and a decision engine program 229.Processor 210 cooperates with memory 220 to controllably execute thevarious programs.

I/O interface 230 cooperates with processor 210 and I/O interfaceprogram 221 to support communications with Network 105, Switch Fabric120 and Control Plane Module 130.

Mapping service program 223 performs mapping of the different tablesneeded to create the TCAM lookup key. Mapping service program 223 alsomaintains the allocation mapping used by TCAM manager apparatus 260 topoint to which copy of data to use for file I/O operations.

Request service program 225 receives and responds to user traffic fromNetwork 105. Various embodiments provide for a set of services which arecommon among n users, where the number of elements in each such superset can be limited to 8, 16 or 32 (depending on the width of TCAMavailable).

Decision engine program 229 pushes updates periodically from I/O 117.Advantageously, decision service program 229 can potentially free spaceon storage system 119. Decision engine program 229 determines theoptimal size of one or more of the I/O efficient storage system volumesbased on the width of the TCAM.

In some embodiments, TCAM 260 may be a virtual machine. Whenprocessor-executable programs stored in memory 220 are implemented onprocessor 210, the program code segments combine with the processor toprovide a unique device that operates analogously to specific logiccircuits.

FIG. 3A depicts a graphical representation of the TCAM Key CompositionTable 310 utilized by the mapping service program 223 of FIG. 2. Forillustrative purposes, a service is defined as a collection of 5-tuplerules. For illustrative purposes, the service set is limited to eight(8). Each user may be using a sub-set of services or all eight (8). Forexample, if S represents a set of 5-tuple to identify a particularservice, then a set of eight (8) such services can be represented asfollows:

-   -   {S1, S2, S3, S4, S5, S6, S7, S8}.

Further, if BSS denotes Base Service Set, i.e., a set of services; then,Base Services Set={S1, S2, S3, S4, S5, S6, S7, S8}.

Each such super set or BSS would be identified by a numeric 16-bit IDcalled BSS-ID and each service within a BSS is identified by a bit IDi.e., a unique bit would be set for a service in a 16-bit word. Forexample, above Base Service Set represented by an ID of 1 and S1 wouldbe assigned an ID of (0x01), S2 (0x02), S3 (0x04) and so on.

Referring to FIG. 3A, for field 305 BSSID is a 16-bit numeric identifierfor a BSS. In some embodiments, BSSID is a 32-bit numeric identifier fora BSS. In other embodiments, this field has a variable length.

In various embodiments, field 310 is a numeric identifier for a BSS.Field 315 is IPv4/6 (i.e., 32/128 bits) Destination address. Field 320is IPv4/6 (i.e. 32/128 bits) Source address. Field 325 is the TCP/UDPDestination Port number (16 bits). Field 330 is the TCP/UDP Source Portnumber (16 bits). Field 335 identifies the Protocol of the packet (8bits).

In one embodiment, the mask for BSS-ID and Service ID is the same. Inother embodiment, different masks are used for BSS-ID and for ServiceID. Masks for other fields are configured according to policy.

A user database should include at least an ID of Base Services Set andbitmap of all subscribed services. In various embodiments, thisinformation is used to form a TCAM lookup key. The TCAM lookup key wouldmatch only those services, which are present in a particular user'sdatabase because each TCAM entry contains a service's Bit ID. In otherembodiments, the information is augmented to form the TCAM lookup key.An illustration of a packet lookup follows. The following set representsa common set of services among eight (8) different users.

BSS-ID₁={S1, S2, S3, S4, S5, S6, S7, S8}.

Referring to FIG. 3B, this Base Service Set (BSS-ID₁) is programmed inTCAM as shown. Field 340 represents the number of entries and is a16-bit field. BSSID Field 345 is a 16-bit numeric identifier for a BSS.Field 350 is a 32-bit numeric identifier for a service. Field 355“S_(n)-Rmt-Addr” is a 32-bit IPv4 Destination Address for Service_(n).Field 360 “Lcl-Addr” is a 32-bit IPv4 Source Address for Service_(n).Field 365 “Rmt-port” is a 16-bit TCP/UDP Destination Port Service_(n).Field 370 “Lcl-port” is a 16-bit TCP/UDP Source Port for Service_(n).Field 375 identifies the protocol for Service_(n).

FIG. 4A depicts a graphical representation of a user's services mapaccording to one embodiment. Specifically, FIG. 4A depicts a table ofsub-set of services subscribed to by each individual user. Field 405represents the user ID. Field 410 lists the subscribed services. Field415 represents the service map for each user.

In various embodiments, the user database is modified according to theabove derived services bit map. FIG. 4B depicts a graphicalrepresentation of a user's data base according to an embodiment.Referring to FIG. 4B, the user data base comprises the three fields,i.e., 420, 425 and 430. In other embodiments, other fields are added toaugment the user's data base. Fields 420, 425 and 430 are describedabove in reference to FIG. 4A.

Illustratively, if a user identified by user ID 1 receives traffic forservice 1, then using the user's database and received data packet, theTCAM lookup key is composed as shown in FIG. 4C, which depicts agraphical representation of a lookup key on user 1 traffic for service 1according to an embodiment. Field 435 is the same as shown in FIG. 4B.Field 440, which is the Svc-ID map contains ‘0x07’ and Svs-ID bit is0x01 as shown in TCAM entry 1 of FIG. 3B. Fields 445-465 are as shown;therefore, the request matches entry 1 as expected.

In another embodiment, user 1 receives traffic for service 4, which user1 did not subscribe to. As a result, the search request to determinewhether or not user 1 subscribes to service 4 is constructed as shown inFIG. 4D.

FIG. 4D depicts a graphical representation of a Lookup Key on User 1Traffic for Service 4 according to an embodiment. Specifically, FIG. 4Ddepicts Service-ID bitmap to be 0x07, and Service-ID to be 0x08 as shownin TCAM entry 4 of FIG. 3B. Fields 480-496 are as shown; however, therequest does not match entry 1 as expected because user 1 does notsubscribe to service 4.

The various embodiments discussed above provide a mechanism to shareTCAM entries among multiple users even when each user is required toenable a selective set of services.

FIG. 5 depicts a flow diagram of a method according to one embodiment.Specifically, FIG. 5 depicts a method suitable for use at a TCAM orother entity operative to provide TCAM usage efficiency by providing acommon TCAM instantiation of service rules associated with multipleservices and/or subscribers.

At step 510, TCAM or other entity limits the elements in a set of commonservices as a result of available TCAM width. In other embodiments, TCAMwidth is dynamically adjusted. At step 520, service rules associatedwith different entities are received. In various embodiments, theservice rules are associated with users or subscribers. In otherembodiments, the service rules are associated with multiple services. Inyet other embodiments, the service rules are associated with bothsubscribers and a multiple of services.

Referring to box 525, one or more service rules may be associated withmultiple services. Generally speaking, one or more service rules mayalso be associated with multiple subscribers.

At step 530, the service rules are instantiated. Referring to box 535,elements in set of common services are instantiated and a lookup tableis generated.

At step 540, a determination of the TCAM classification fields is made.The determination includes the masks forming the corresponding TCAMlookup key.

Referring to box 545, this determination is made using classificationcriteria, mask for base service set ID, mask for service ID, mask forother fields and the like. Generally, this step requires that the userdatabase includes ID of base service set and bitmap of all servicessubscribed for.

At step 550, a signal is provided indicating common instantiation ofservice rules in the look-up table in response to a search request. Aservice ID bitmap is established based upon the service profileinformation of a user as described above. The available services aregrouped into service set. At step 560, a common service set having acommon set of rules is determined. The user associated with a request orincoming packet is identified based on phone ID, source address and thelike. If a user is authenticated, the packet is processed; otherwise,the packet is dropped. At step 570, the user associated with a commonservice set is identified. At step 580, the incoming packets areprocessed according to common service set rules indicated by service IDbitmap. These criteria include service level agreement (SLA), trafficclassification constraints, subscriber/user constraints, differentiatedservice levels, differentiated QoS levels/parameters and, generally, anyother parameter impacting the number, type, operating parameters and/orother characteristics associated with classification or processing rulesused within the context of a received packet processing.

The various steps described herein with respect to FIG. 5 implement anefficient usage of TCAM, illustratively, a common TCAM instantiation ofservice rules associated with multiple services and/or subscribers isprovided.

The various embodiments discussed herein primarily contemplate the useof ternary content addressable memory (TCAM) adapted for havinginstantiated therein data representative of various rules, services andso on. In various embodiments, non-TCAM memory is also be used for thispurpose, such as one or more of the memory elements discussed hereinwith respect to the various figures. In various embodiments, acombination of TCAM and non-TCAM memory is used for this purpose. Invarious embodiments, other types of content addressable memory may beused.

FIG. 6 depicts a high-level block diagram of a general purpose computersuitable for use in performing the functions described herein. Asdepicted in FIG. 6, system 600 comprises a processor element 602 (e.g.,a CPU), a memory 604, e.g., random access memory (RAM) and/or read onlymemory (ROM), a packet processing module 605, and various input/outputdevices 606 (e.g., storage devices, including but not limited to, a tapedrive, a floppy drive, a hard disk drive or a compact disk drive, areceiver, a transmitter, a speaker, a display, an output port, and auser input device (such as a keyboard, a keypad, a mouse, and thelike)).

It will be appreciated that computer 600 depicted in FIG. 6 provides ageneral architecture and functionality suitable for implementingfunctional elements described herein and/or portions of functionalelements described herein. Functions depicted and described herein maybe implemented in software and/or hardware, e.g., using a generalpurpose computer, one or more application specific integrated circuits(ASIC), and/or any other hardware equivalents.

It is contemplated that some of the steps discussed herein as softwaremethods may be implemented within hardware; for example, as circuitrythat cooperates with the processor to perform various method steps.Portions of the functions/elements described herein may be implementedas a computer program product wherein computer instructions, whenprocessed by a computer, adapt the operation of the computer such thatthe methods and/or techniques described herein are invoked or otherwiseprovided. Instructions for invoking the inventive methods may be storedin fixed or removable media, transmitted via a data stream in abroadcast or other signal bearing medium, transmitted via tangible mediaand/or stored within a memory within a computing device operatingaccording to the instructions.

Although various embodiments which incorporate the teachings of thepresent invention have been shown and described in detail herein, thoseskilled in the art can readily devise many other varied embodiments thatstill incorporate these teachings.

What is claimed is:
 1. A method of processing incoming packets, themethod comprising: establishing for each of a plurality of users arespective service ID bitmap adapted to indicate one or more availableservices associated with a user wherein each service is associated witha corresponding set of rules instantiated into memory, each rule beingassociated with a respective service ID; grouping a plurality ofservices into common service set having associated with it a common setof rules; determining each user associated with the common service set;and processing each received packet from the user associated with theservice set according to those common service set rules indicated by theuser service ID bitmap.
 2. The method of claim 1, wherein the service IDbitmap comprises services, subscribers.
 3. The method of claim 1,wherein the one or more services are common among a plurality of users.4. The method of claim 3, wherein a number of elements in the one ormore services being common among a plurality of users depends on thewidth of available TCAM.
 5. The method of claim 4, wherein each of theone or more users utilizes a subset of services.
 6. The method of claim5, wherein each of the one or more users utilizes all of the services.7. The method of claim 1, wherein the criteria for grouping the one ormore incoming packets include service level agreement (SLA), trafficclassification constraints, subscriber/user constraints, differentiatedservice levels, differentiated QoS levels/parameters.
 8. The method ofclaim 1, wherein the plurality of services includes data, video, VoIP.9. An apparatus for processing incoming packets, the apparatuscomprising: a memory; and a processor configured to: establish for eachof a plurality of users a respective service ID bitmap adapted toindicate one or more available services associated with a user whereineach service is associated with a corresponding set of rulesinstantiated into ternary content addressable memory (TCAM), each rulebeing associated with a respective service ID; group a plurality ofservices into common service set having associated with it a common setof rules; determine each user associated with the common service set;and process each received packet from the user associated with theservice set according to those common service set rules indicated by theuser service ID bitmap.
 10. The method of claim 9, wherein the serviceprofile information comprises services, subscribers.
 11. The method ofclaim 10, wherein the one or more services are common among a pluralityof users.
 12. The method of claim 11, wherein a number of elements inthe one or more services being common among a plurality of users dependson the width of available TCAM.
 13. The method of claim 12, wherein eachof the one or more users utilizes a subset of services.
 14. The methodof claim 13, wherein each of the one or more users utilizes all of theservices.
 15. The method of claim 9, wherein the criteria for groupingthe one or more incoming packets include service level agreement (SLA),traffic classification constraints, subscriber/user constraints,differentiated service levels, differentiated QoS levels/parameters. 16.The method of claim 9, wherein the plurality of services includes data,video and VoIP.
 17. A computer readable medium including softwareinstructions which, when executed by a processor, perform a method forprocessing incoming packets comprising: establishing for each of aplurality of users a respective service ID bitmap adapted to indicateone or more available services associated with a user wherein eachservice is associated with a corresponding set of rules instantiatedinto memory, each rule being associated with a respective service ID;grouping a plurality of services into common service set havingassociated with it a common set of rules; determining each userassociated with the common service set; and processing each receivedpacket from the user associated with the service set according to thosecommon service set rules indicated by the user service ID bitmap.
 18. Acomputer program product, wherein a computer is operative to processsoftware instructions which adapt the operation of the computer suchthat computer performs a method for processing incoming packetscomprising: establishing for each of a plurality of users a respectiveservice ID bitmap adapted to indicate one or more available servicesassociated with a user wherein each service is associated with acorresponding set of rules instantiated into memory, each rule beingassociated with a respective service ID; grouping a plurality ofservices into common service set having associated with it a common setof rules; determining each user associated with the common service set;and processing each received packet from the user associated with theservice set according to those common service set rules indicated by theuser service ID bitmap